package com.qunar.wan.common_api.model.enums;

/**
 * User: cyoung Date: 11/26/13 Time: 11:20 AM 活动状态
 */
public enum ActivityState {
    CHECKING("审核中", 0), CHECK_SUCCESS("审核通过", 1), CHECK_FAILURE("审核不通过", 2), CANCELED("活动取消", 3), DELETED("记录被删除", 4);

    private String mean;
    private int code;

    public String getMean() {
        return mean;
    }

    public int getCode() {
        return code;
    }

    private ActivityState(String mean, int code) {
        this.mean = mean;
        this.code = code;
    }

    public int code() {
        return this.code;
    }

    public static ActivityState codeOf(int value) {
        for (ActivityState state : values()) {
            if (state.code == value) {
                return state;
            }
        }
        return null;
    }

}
